<template>
  <div class="son2">
    <h3>子组件</h3>
    <button @click="clickFather()">发送</button>
  </div>
</template>
<script lang="ts" setup>
import { ref } from "vue";
const emit = defineEmits(["on-click"]);
function clickFather() {
  let data: string = "1231231";
  emit("send-toy", data);
}
</script>
<style scoped>
.son2 {
  width: 80vw;
  height: 80vh;
  border: 1px solid red;
}
</style>